home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003 March / EnterCD 03_2003.iso / Multimedia / IntelliCAD 2001 3.3 / data1.cab / API / sds / entpoint.c next >
Encoding:
C/C++ Source or Header  |  2003-01-05  |  1.5 KB  |  66 lines

  1. /* SDS\ENTPOINT.C
  2.  * Copyright (C) 1997-1998 Visio Corporation. All rights reserved.
  3.  * 
  4.  * Abstract
  5.  * 
  6.  * Sample SDS application entrypoint definition.
  7.  * 
  8.  *    $Revision: 1.1.1.1 $ $Date: 2000/01/19 13:41:13 $
  9.  * 
  10.  */ 
  11.  
  12. #define SDS_CADAPI 1
  13. #include <windows.h>
  14. #include "sds.h"
  15.  
  16. char      adsw_AppName[512];
  17. char      *sds_argVec = adsw_AppName;
  18. char      sds_appname[512];
  19. HWND      adsw_hwndAcad;
  20. HINSTANCE adsw_hInstance;
  21.  
  22. HWND      adsw_hWnd;
  23. int       adsw_wait;
  24.  
  25. sds_matrix sds_identmat;
  26.  
  27. // Protos
  28. int SDS_GetGlobals(char *appname,HWND *hwnd,HINSTANCE *hInstance);
  29. void __declspec(dllexport) SDS_EntryPoint(HWND hWnd);
  30.  
  31.  
  32. void __declspec(dllexport) SDS_EntryPoint(HWND hWnd) {
  33.  
  34.     int i,j;
  35.     for(i=0; i<=3; i++) for(j=0; j<=3; j++) sds_identmat[i][j]=0.0;
  36.     for(i=0; i<=3; i++) sds_identmat[i][i]=1.0;
  37.  
  38.     SDS_GetGlobals(adsw_AppName,&adsw_hwndAcad,&adsw_hInstance);
  39.     strncpy(sds_appname,adsw_AppName,sizeof(sds_appname)-1);
  40.     SDS_main(1,&sds_argVec);
  41.     return;
  42. }
  43.  
  44. #if defined(SDS_OVERRIDEMEMORYFUNCS)
  45.     #undef malloc
  46.     #undef free
  47.     #undef realloc
  48.     #undef calloc
  49.  
  50.     void *malloc(size_t sizeBytes) {
  51.         return(sds_malloc(sizeBytes));
  52.     }
  53.  
  54.     void free(void *pMemLoc) {
  55.         sds_free(pMemLoc);
  56.     }
  57.  
  58.     void *realloc(void *pOldMemLoc, size_t sizeBytes) {
  59.         return(sds_realloc(pOldMemLoc,sizeBytes));
  60.     }
  61.  
  62.     void *calloc(size_t sizeHowMany, size_t sizeBytesEach) {
  63.         return(sds_calloc(sizeHowMany,sizeBytesEach));
  64.     }
  65. #endif
  66.